package com.wangzeqi.changliaoba.worldlet;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.wangzeqi.changliaoba.R;
import com.wangzeqi.changliaoba.base.BaseFragment;
import com.wangzeqi.changliaoba.worldlet.circle.FriendCircleActivity;

/**
 * Created by dllo on 16/2/29.
 */
public class LiveFragment extends BaseFragment implements View.OnClickListener {

    private LinearLayout friendWorld,friendCircle;
    private TextView my_location;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_live,null);
        friendWorld = (LinearLayout) view.findViewById(R.id.friend_world);
        friendWorld.setOnClickListener(this);
        friendCircle = (LinearLayout) view.findViewById(R.id.friend_circle);
        friendCircle.setOnClickListener(this);
        my_location = (TextView) view.findViewById(R.id.my_location);
        my_location.setOnClickListener(this);
        return  view;
    }


    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.friend_world:

                break;
            case R.id.friend_circle:
                Intent intent = new Intent(getActivity(), FriendCircleActivity.class);
                startActivity(intent);
                break;
            case R.id.my_location:
                Intent intent_location = new Intent(getActivity(), LocationMapActivity.class);
                startActivity(intent_location);
                break;

        }
    }
}
